package com.itheima.classandobject;

/**
 * @Author 王加鑫
 * @Date 2021/4/26 14:43
 * @Version 1.0
 */
public class Student {
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name1) {
        name = name1;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void show(){
        System.out.println(this.name + "..." + this.age);
    }

}

class StudentTest{
    public static void main(String[] args) {
        Student student1 = new Student();
        student1.setAge(20);
        student1.setName("张三");
        System.out.println("student1"+student1.getName());

        Student student2 = new Student();
        student2.setName("李四");
        System.out.println("student2:"+student2.getName());
        System.out.println("student1"+student1.getName());

    }
}
